﻿using System.ComponentModel.DataAnnotations;

namespace RIAExample.Web.CustomValidations
{
    public static class ValueGreaterThanZero
    {
        public static ValidationResult Validate(decimal preco)
        {
            if (preco == 0M)
                return new ValidationResult("O valor não pode ser igual a zero");
            else
                return ValidationResult.Success;
        }
    }
}